﻿using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using System;

namespace SCQS
{
    public partial class _Default : Page
    {
        public void Page_Load(object sender, System.EventArgs e)
        {
            // Change the current path so that the Routing handler can correctly interpret
            // the request, then restore the original path so that the OutputCache module
            // can correctly process the response (if caching is enabled).

            string originalPath = Request.Path;
            HttpContext.Current.RewritePath(Request.ApplicationPath, false);
            IHttpHandler httpHandler = new MvcHttpHandler();
            httpHandler.ProcessRequest(HttpContext.Current);
            HttpContext.Current.RewritePath(originalPath, false);
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            /*判断验证码是否正确*/
            /*string code = txtCode.Text.Trim().ToUpper(); //注意一定要转化成大写形式
            string rightCode = Session["Code"].ToString();
            if (code != rightCode)
            {   //JS语句，提示 验证码输入错误 但是页面不会刷新
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('验证码输入错误');</script>");
                return;
            }*/
        }
    }
}
